﻿@model QRCode2.Models.HomeForSale

@{
    ViewBag.Title = "Details";
}

@using (Html.BeginForm("Details", "HomeForSale", FormMethod.Post, new { enctype = "multipart/form-data" }))
{

<fieldset>
    <legend>HomeForSale</legend>

    <div class="display-field">
         @Html.DisplayFor(model => model.Name)
    </div>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.Description)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Description)
    </div>

    <div class="display-field">
        @Html.DisplayFor(model => model.Address)
    </div>

    <div class="display-field">
        Days on market: @Html.DisplayFor(model => model.DaysOnMarket)
    </div>

    <div class="display-field">
       Heating: @Html.DisplayFor(model => model.Heating)
    </div>

    <div class="display-field">
        Year Built: @Html.DisplayFor(model => model.YearBuilt)
    </div>

    <div class="display-field">
      Price:  @Html.DisplayFor(model => model.AskingPrice)
    </div>

    @if (ViewBag.MainPicture != "")
    {

    <br />
        <img src= "@Url.Content(ViewBag.MainPicture)" alt="MainPicture" />
    <br />
        
    }


    @if (ViewBag.Picture1 != "")
    {

        <div class="display-label">
             @Html.DisplayNameFor(model => model.Picture1Name)
        </div>
        <div class="display-field">
            @Html.DisplayFor(model => model.Picture1Name)
        </div>

        <br />
            <img src= "@Url.Content(ViewBag.Picture1)" alt="Picture1" />
        <br />
    }

    @if (ViewBag.Picture2 != "")
    {
        <div class="display-label">
            @Html.DisplayNameFor(model => model.Picture2Name)
        </div>
        <div class="display-field">
            @Html.DisplayFor(model => model.Picture2Name)
        </div>

        <br />
            <img src= "@Url.Content(ViewBag.Picture2)" alt="Picture2" />
        <br />
    }

    @if (ViewBag.Picture3 != "")
    {
        <div class="display-label">
             @Html.DisplayNameFor(model => model.Picture3Name)
        </div>
        <div class="display-field">
            @Html.DisplayFor(model => model.Picture3Name)
        </div>

        <br />
            <img src= "@Url.Content(ViewBag.Picture3)" alt="Picture3" />
        <br />
    }

    @if (ViewBag.Picture4 != "")
    {
        <div class="display-label">
            @Html.DisplayNameFor(model => model.Picture4Name)
        </div>
        <div class="display-field">
            @Html.DisplayFor(model => model.Picture4Name)
        </div>

        <br />
            <img src= "@Url.Content(ViewBag.Picture4)" alt="Picture4" />
        <br />
    }

    @if (ViewBag.Picture5 != "")
    {
        <div class="display-label">
         @Html.DisplayNameFor(model => model.Picture5Name)
        </div>
        <div class="display-field">
            @Html.DisplayFor(model => model.Picture5Name)
        </div>

        <br />
            <img src= "@Url.Content(ViewBag.Picture5)" alt="Picture5" />
        <br />
    }

     @if (ViewBag.Movie != "")
        {
            <a href= "@Url.Content(ViewBag.Movie)"> Movie </a>
            <br /> 
        }

     <br />

     <div>
        @Html.ActionLink("View Agent Details", "Details", "User", new {un = Model.AgentUserName}, null)
     </div>

     <br />

    <div>
        @Html.ActionLink("Add Home to Favorites","Create", "UserFavorite", new {uf = Model.ID}, null)
    </div>

    <br />


    @if (ViewBag.CommentSend != "")
    {
        <br />
         <label for="lblQRCode">@ViewBag.CommentSend</label>
        <br />
    }

    
        <label for="lblQRCode">Send Message to Agent</label>
        <input id="commentToAgent" name="commentToAgent" type="text" />
    
         <p>
            <input type="submit" value="Send Comment To Agent" />
        </p>


</fieldset>
    
}    
    

